package com.dongdongshop.mapper;

import com.dongdongshop.model.SpecificationOption;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SpecOptionMapper {

    /**
     * 通过specId查询Option所有数据
     * @param id
     * @return
     */
    List<SpecificationOption> queryOptionBySpecId(Long id);

    /**
     * 规格选项批量增加
     * @param specificationOptionList
     */
    void add(@Param("options") List<SpecificationOption> specificationOptionList);


    /**
     *通过specId删除全部数据
     * @param id
     */
    void deleteBySpecId(Long id);


    /**
     *通过specId批量删除全部数据
     * @param ids
     */
    void batchRemoveBySpecId(List<Integer> ids);

    List<SpecificationOption> queryByIds(@Param("specIdList") List<Long> specIdList);
}
